package com.seeyou.lake.base

import androidx.viewbinding.ViewBinding

/**
 * @des
 * @date 2021/9/23
 * @author fade
 */
abstract class MyBaseActivity<VB : ViewBinding, VM : myBaseViewModel> : EActivity<VB>() {
    protected val mVModel: VM by lazy { myViewModel() }
    abstract fun myViewModel(): VM

    override fun onMyInternetListener() {
        super.onMyInternetListener()
        mVModel.loadDa.observe(this) {
            when (it) {
                LoadState.RUNNING -> {
                    showLoadingView()
                }
                LoadState.OVER -> {
                    hideLoadingView()
                }
                else -> {

                }
            }
        }

    }

}